/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
// Kare nesnesi buraya eklendii
package paket;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;

/**
 *
 * @author mete
 */
public class SquareRx {
    private  int row;
    private  int col;
    Rectangle2D.Double rect;
    Color color = Color.BLACK;
    Color bgColor = Color.LIGHT_GRAY;
    Color selColor = Color.BLUE;
    private boolean selected = false;

    public SquareRx(int r, int c, Rectangle2D.Double rect) {
        row = r;
        col = c;
        this.rect = rect;
    }

    public void draw(Graphics2D g2, double x, double y) {
        g2.setPaint(bgColor);
        g2.fill(rect);
        g2.setPaint(color);
    }

    public void setSelected(boolean selected) {
        this.selected = selected;
    }

    public boolean isSelected() { return selected; }

    @Override
    public String toString() {
        return "SQUARE[row:" + row + ", col:" + col +
                    ", selected:" + selected + "]";
    }
}
